{template 'header'}
<link rel="stylesheet" href="{$siteRoot}addons/{$modular_name}/template/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{$siteRoot}addons/{$modular_name}/template/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="{$siteRoot}addons/{$modular_name}/template/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="{$siteRoot}addons/{$modular_name}/template/kindeditor/lang/zh-CN.js"></script>
<script charset="utf-8" src="{$siteRoot}addons/{$modular_name}/template/kindeditor/plugins/code/prettify.js"></script>
<ul class="nav nav-tabs">
    <li {if $op == 'ordinary'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'ordinary'));}">常用设置</a></li>
    <li {if $op == 'share'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'share'));}">分享设置</a></li>
    <li {if $op == 'withdrawals'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'withdrawals'));}">提现配置</a></li>
    <li {if $op == 'diyUi'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'diyUi'));}">DiY设置</a></li>
    <li {if $op == 'advertising'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'advertising'));}">流量主设置</a></li>
    <li {if $op == 'pdd'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'pdd'));}">多多进宝设置</a></li>
    <li {if $op == 'sigin'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'sigin'));}">签到设置</a></li>
    <li {if $op == 'luck'}class="active"{/if}><a href="{php echo $this->createWeburl('config', array('op' => 'luck'));}">抽奖/订阅/设置</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    {if $op == 'share'}
    <div class="form-group">
        <label class="col-xs-12 col-lucksm-3 col-md-1 control-label">特殊替换:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px">
            输入{name}会自动替换成昵称
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">普通分享文字:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="share_text" placeholder="普通分享文字" value="{$share_text['value']}" type="text">
        </div>
    </div>
    <div class="form-group" id="ling-1">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">分享图片:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('share_image', $share_image['value'], tomedia($share_image['value']));}
        </div>
    </div>
    {elseif $op == 'message'}
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提示:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px; color: red">
            <p>小程序服务类目选择,工具->健康管理 </p>
            <p>收益订阅消息id->奖励到账通知</p>

        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">收益订阅消息id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="profit_subscribe_id" placeholder=" 收益订阅消息id" value="{$profit_subscribe_id['value']}" type="text">
            <small style="color: red">提示: 选择栏目  奖励名称 、 奖励说明</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">收益到账消息发送时间:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <select name="earnings_send_hour">
                {php for ($i = 1; $i < 24; $i++){}
                <option {if $earnings_send_hour['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>点
            <select name="earnings_send_minute">
                {php for ($i = 0; $i < 60; $i++){}
                <option {if $earnings_send_minute['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>分
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">定时任务</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="crontab" placeholder="定时任务" value="{$crontab}" type="text" disabled>
            <small style="color: red"> 需要把这个地址复制到宝塔计划任务 选择访问url  每5分钟执行一次</small>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">虚拟用户打卡计划任务</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="batch" placeholder="虚拟用户打卡计划任务" value="{$batch}" type="text" disabled>
        </div>
    </div>

    {elseif $op == 'sigin'}

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到页面标题:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="sigin_title" placeholder="签到页面标题" value="{$sigin_title['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到是否开启看视频奖励翻倍:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="is_double" value="1" {if $is_double['value'] == 1 || $is_double['value'] == ''}checked{/if} />不开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="is_double" value="2" {if $is_double['value'] == 2}checked{/if} />开启
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第一天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_one_day" placeholder="签到第一天奖励积分" value="{$signin_one_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第二天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_two_day" placeholder="签到第二天奖励积分" value="{$signin_two_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第三天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_three_day" placeholder="签到第三天奖励积分" value="{$signin_three_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第四天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_four_day" placeholder="签到第四天奖励积分" value="{$signin_four_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第五天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_five_day" placeholder="签到第五天奖励积分" value="{$signin_five_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第六天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_six_day" placeholder="签到第六天奖励积分" value="{$signin_six_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到第七天奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signin_seven_day" placeholder="签到第七天奖励积分" value="{$signin_seven_day['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">获取群扣除积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="get_group" placeholder="获取群扣除积分" value="{$get_group['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到订阅消息id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="sign_subscribe" placeholder=" 收益订阅消息id" value="{$sign_subscribe['value']}" type="text">
            <small style="color: red">选择栏目: 休闲娱乐 签到提醒  签到名称、签到奖励、温馨提示</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到订阅消息发送时间:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <select name="sign_subscribe_send_hour">
                {php for ($i = 1; $i < 24; $i++){}
                <option {if $sign_subscribe_send_hour['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>点
            <select name="sign_subscribe_send_minute">
                {php for ($i = 0; $i < 60; $i++){}
                <option {if $sign_subscribe_send_minute['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>分
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">定时任务</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="signRemind" placeholder="定时任务" value="{$signRemind}" type="text" disabled>
        </div>
    </div>
    {elseif $op == 'luck'}

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到订阅消息id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="dy_send_message_kj_id" placeholder=" 签到订阅消息id" value="{$dy_send_message_kj_id['value']}" type="text">
            <small style="color: red">选择栏目: 休闲娱乐  抽奖结果通知  活动商品、注意事项</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价进度通知订阅消息id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="dy_bargaining_process_id" placeholder=" 砍价进度通知订阅消息id" value="{$dy_bargaining_process_id['value']}" type="text">
            <small style="color: red">选择栏目: 休闲娱乐 	商品名称、砍价进度、温馨提示</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">新活动提醒消息id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="new_activities" placeholder=" 新活动提醒消息id" value="{$new_activities['value']}" type="text">
            <small style="color: red">选择栏目: 休闲娱乐  新活动提醒  活动时间、备注</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">抽奖订阅消息定时任务</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="crontab" placeholder="抽奖订阅消息定时任务" value="{$KjCrontabDy}" type="text" disabled>
            <small style="color: red"> 需要把这个地址复制到宝塔计划任务 选择访问url  每5分钟执行一次</small>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">新活动提醒计划任务地址</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="crontab" placeholder="新活动提醒计划任务地址" value="{$activitySend}" type="text" disabled>
            <small style="color: red"> 需要把这个地址复制到宝塔计划任务 选择访问url  每5分钟执行一次</small>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价计划任务地址</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bargaining" placeholder="砍价计划任务地址" value="{$bargaining}" type="text" disabled>
            <small style="color: red"> 需要把这个地址复制到宝塔计划任务 选择访问url  每30分钟执行一次</small>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">助力文案:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="info_code_tips" placeholder="助力文案" value="{$info_code_tips['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">抽奖列表页标题:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="luck_title" placeholder="抽奖列表页标题" value="{$luck_title['value']}" type="text">
        </div>
    </div>
    {elseif $op == 'advertising'}

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">流量主banner广告:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="banner_id" placeholder="流量主banner广告" value="{$banner_id['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">激励视频id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="video_id" placeholder="激励视频id" value="{$video_id['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">视频广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="video_ad_id" placeholder="视频广告id" value="{$video_ad_id['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">插屏广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="screen_id" placeholder="插屏广告id" value="{$screen_id['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">抽奖列表原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="luck_ad" placeholder="抽奖列表原生广告id" value="{$luck_ad['value']}" type="text">
            <small style="color: red">展示不友好的情况下，请选择横幅</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">签到页面原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="sign_ad" placeholder="签到页面原生广告id" value="{$sign_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">个人中心原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="my_ad" placeholder="个人中心原生广告id" value="{$my_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">积分商品原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="goods_ad" placeholder="积分商品原生广告id" value="{$goods_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价详情页面原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bargain_ad" placeholder="砍价详情页面原生广告id" value="{$bargain_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">抽奖详情页面原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="luck_details_ad" placeholder="抽奖详情页面原生广告id" value="{$luck_details_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">抽奖参与人页面原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="luck_join" placeholder="抽奖参与人页面原生广告id" value="{$luck_join['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价商品页广告原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="goods_bargain_ad" placeholder="砍价商品页广告原生广告id" value="{$goods_bargain_ad['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价商品列表页广告原生广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="goods_list_bargain_ad" placeholder="砍价商品列表页广告原生广告id" value="{$goods_list_bargain_ad['value']}" type="text">
        </div>
    </div>


    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">原生单格子广告:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="single_ad" placeholder="原生单格子广告" value="{$single_ad['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">全屏广告id:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="full_screen_ad" placeholder="全屏广告id" value="{$full_screen_ad['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">全屏广告显示时间:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="ad_time" placeholder="全屏广告显示时间 (单位秒)" value="{$ad_time['value']}" type="text">
            <small style="color: red">为提供用户体验友好度,建议设置不超过10s (单位秒) </small>
        </div>
    </div>


    {elseif $op == 'diyUi'}
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提示:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px; color: red">
            <p> 前端自带的有相关图片,需要就自动上传，不需要就用系统自带的</p>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">个人中心背景:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('user_bg', $user_bg['value'], tomedia($user_bg['value']));}
            <small style="color: red">410 * 190</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">活动规则顶部图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('hd_rule_img_top', $hd_rule_img_top['value'], tomedia($hd_rule_img_top['value']));}
            <small style="color: red"> 410 * 100</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">常见问题顶部图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('cj_rule_img_top', $cj_rule_img_top['value'], tomedia($cj_rule_img_top['value']));}
            <small style="color: red"> 410 * 100</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价图标:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('bargain_img', $bargain_img['value'], tomedia($bargain_img['value']));}
            <small style="color: red"> 330 * 180</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价海报背景图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('bargain_poster_bg', $bargain_poster_bg['value'], tomedia($bargain_poster_bg['value']));}
            <small style="color: red"> 1000 * 2000</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">首页背景图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('home_bg', $home_bg['value'], tomedia($home_bg['value']));}
            <small style="color: red"> 750 * 700</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">首页圆形图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('circle_img', $circle_img['value'], tomedia($circle_img['value']));}
            <small style="color: red"> 300 * 300</small>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">首页悬浮金币图:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('pop_gold', $pop_gold['value'], tomedia($pop_gold['value']));}
            <small style="color: red"> 100 * 100</small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">获颜颜色代码:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px">
            <span style="color: red"> 切记！！！RGB 演示代码前面有个 #</span><br>
            <span style="color: red"><a href="https://link.fobshanghai.com/rgbcolor.htm" target="_blank">点击我获取RGB颜色代码</a></span>
        </div>
    </div>


    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"> 砍价商品和页面背景颜色:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bargain_style" placeholder="砍价商品和页面背景颜色 例如 #FFF68F" value="{$bargain_style['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"> 金币上字体颜色:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="coin_font_color" placeholder="金币上字体颜色 例如 #FFF68F" value="{$coin_font_color['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">公告背景色:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="roll_content_bg" placeholder="公告背景色 例如 #FFF68F" value="{$roll_content_bg['value']}" type="text">
        </div>
    </div>

    {elseif $op == 'withdrawals'}
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提现按钮文字:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="withdrawal_button_txt" placeholder="提现按钮文字" value="{$withdrawal_button_txt['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">是否开启提现:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="open_withdrawal" value="1" {if $open_withdrawal['value'] == 1 || $withdrawal_state['value'] == ''}checked{/if} />开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="open_withdrawal" value="2" {if $open_withdrawal['value'] == 2}checked{/if} /> 关闭
            </label>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">每天提现金额上限:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bag_daily_upper" placeholder="每天提现金额上限" value="{$bag_daily_upper['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">每天提现次数:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="withdrawals_day_number" placeholder="每天提现次数" value="{$withdrawals_day_number['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提现超过多少才审核:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="cash_reviewed" placeholder="提现超过多少才审核" value="{$cash_reviewed['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">apiclient_cert:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="_apiclient_cert" placeholder="apiclient_cert" type="file">
            <input class="form-control" value="{$apiclient_cert['value']}" name="apiclient_cert" disabled="disabled">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">apiclient_key:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="_apiclient_key" placeholder="apiclient_key" type="file">
            <input class="form-control" value="{$apiclient_key['value']}" name="apiclient_key" disabled="disabled">
        </div>
    </div>


    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提现方式:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="cash_type" value="1" {if $cash_type['value'] == 1 || $cash_type['value'] == ''}checked{/if} />企业付款零钱
            </label>
            <label class="radio-inline">
                <input type="radio" name="cash_type" value="2" {if $cash_type['value'] == 2}checked{/if} />收款码
            </label>
        </div>
    </div>
    <div class="form-group" >
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提现背景:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            {php echo tpl_form_field_image('cash_bg', $cash_bg['value'], tomedia($cash_bg['value']));}
            <small style="color: red"> 750 * 350</small>
        </div>
    </div>
    <span id="cash_explain">
        {loop $cash_explain['value'] $key $item}
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-1 control-label">{if $key == 0}提现说明:{/if}</label>
            <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
                <input class="form-control" style="width:80%;float:left" name="cash_explain[]" placeholder="提现说明" value="{$item}" type="text">
                {if $key == 0}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" id="add_cash_explain">增加</button>
                {else}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_cash_explain(this)">删除</button>
                {/if}
            </div>
        </div>
        {/loop}
    </span>
    <script type="application/javascript">
        $(function () {
            $('#add_cash_explain').click(function () {
                var html = '<div class="form-group">' +
                    '<label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>' +
                    '<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">' +
                    '<input class="form-control" style="width:80%;float:left" name="cash_explain[]" placeholder="提现说明" value="" type="text">' +
                    '<button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_cash_explain(this)">删除</button>' +
                    '</div>' +
                    '</div>';
                $('#cash_explain').append(html);
            });
        });
        function delete_cash_explain(t) {
            $(t).parent().parent().remove();
        }
    </script>


    {elseif $op == 'pdd'}
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提示:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px; color: red">
            <p>
                1:注册拼多多开放平台创建应用<a target="_blank" href="https://open.pinduoduo.com/#/index">[点我]</a>
            </p>
            <p>
                2,登录多多进宝进宝绑定<a target="_blank" href="https://jinbao.pinduoduo.com/">[多多进宝]</a>
            </p>
            <p>3,尊敬的用户你好，如您看还不会申请, 请联系作者</p>
        </div>
    </div>
<!--    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">是否开启多多进宝:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="pdd_switch" value="1" {if $pdd_switch['value'] == 1 || $pdd_switch['value'] == ''}checked{/if} />开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="pdd_switch" value="2" {if $pdd_switch['value'] == 2}checked{/if} /> 关闭
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">多多导航名称:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="pdd_navigation_name" placeholder="多多导航名称" value="{$pdd_navigation_name['value']}" type="text">
        </div>
    </div>-->
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">推广位pid:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="pdd_pid" placeholder="拼多多推广位pid" value="{$pdd_pid['value']}" type="text">
            <small style="color: red">登录多多进宝 效果数据-> 推手推广效果-> 推广位管理  </small>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">拼多多Client ID:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="pdd_client_id" placeholder="拼多多Client ID" value="{$pdd_client_id['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">拼多多client_secret:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="pdd_client_secret" placeholder="拼多多client_secret" value="{$pdd_client_secret['value']}" type="text">
        </div>
    </div>

<!--    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">拼多多订单返水滴:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="ppd_commission" placeholder="拼多多订单返水滴" value="{$ppd_commission['value']}" type="text">
            <small style="color: red"> 设置的是百分比 比如设置的是 50【也就是50%】 佣金为50元 25水滴</small>
        </div>
    </div>-->
    <span id="popular_recommend">
        {loop $popular_recommend['value'] $key $item}
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-1 control-label">{if $key == 0}热门推荐:{/if}</label>
            <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
                <input class="form-control" style="width:80%;float:left" name="popular_recommend[]" placeholder="热门推荐" value="{$item}" type="text">
                {if $key == 0}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" id="add_popular_recommend">增加</button>
                {else}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_popular_recommend(this)">删除</button>
                {/if}
            </div>
        </div>
        {/loop}
    </span>
    {else}

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">提示:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12" style="margin-top:8px; color: red">
            <p>https://wx.qlogo.cn</p>
            <p>https://thirdwx.qlogo.cn</p>
            <p>把这两个域名加入服务器域名</p>
            <p>如果设置了砍价需要看激励视频。激励视频加载失败的情况下会去调用试玩小程序的appid[前提是你配置了试玩小程序的appid]</p>
        </div>
    </div>
    <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-1 control-label">小程序名:</label>
            <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
                <input class="form-control" name="xcx_title" placeholder="小程序名" value="{$xcx_title['value']}" type="text">
            </div>
        </div>


    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价是否需要观看激励视频:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="is_bargain_video" value="1" {if $is_bargain_video['value'] == 1 || $is_bargain_video['value'] == ''}checked{/if} />不需要
            </label>

            <label class="radio-inline">
                <input type="radio" name="is_bargain_video" value="2" {if $is_bargain_video['value'] == 2}checked{/if} /> 需要
            </label>
            <label class="radio-inline">
                <input type="radio" name="is_bargain_video" value="3" {if $is_bargain_video['value'] == 3}checked{/if} /> 试玩其他小程序
            </label>

        </div>

    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价试玩时间:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bargain_demo_time" placeholder="砍价试玩时间" value="{$bargain_demo_time['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价试玩小程序appid:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="bargain_demo_appid" placeholder="砍价试玩小程序appid" value="{$bargain_demo_appid['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">审核模式:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="audit_model" value="1" {if $audit_model['value'] == 1 || $audit_model['value'] == ''}checked{/if} />开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="audit_model" value="2" {if $audit_model['value'] == 2}checked{/if} /> 关闭
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">是否开启红包:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="open_bag" value="1" {if $open_bag['value'] == 1 || $open_bag['value'] == ''}checked{/if} />开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="open_bag" value="2" {if $open_bag['value'] == 2}checked{/if} /> 关闭
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">砍价多少次算老用户:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="old_bargain_number" placeholder="砍价多少次算老用户" value="{$old_bargain_number['value']}" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">积分名字:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="integral_name" placeholder="积分名字" value="{$integral_name['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">特别提醒:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="special_reminder" placeholder="特别提醒" value="{$special_reminder['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">授权个人信息奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="auth_integral" placeholder="授权个人信息奖励积分" value="{$auth_integral['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">绑定手机号奖励积分:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="auth_phone" placeholder="绑定手机号奖励积分" value="{$auth_phone['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">每天可以砍价次数:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" name="every_day_number" placeholder="每天可以砍价次数" value="{$every_day_number['value']}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">每天红包几点发放:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <select name="red_grant_hour">
                {php for ($i = 1; $i < 24; $i++){}
                <option {if $red_grant_hour['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>点
            <select name="red_grant_minute">
                {php for ($i = 0; $i < 60; $i++){}
                <option {if $red_grant_minute['value'] == $i}selected="selected"{/if} value="{$i}">{$i}</option>
                {php } }
            </select>分
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">是否显示还需要邀请新用户砍完:</label>
        <div class="col-sm-9 col-xs-12">
            <label class="radio-inline">
                <input type="radio" name="show_share_people" value="1" {if $show_share_people['value'] == 1 || $show_share_people['value'] == ''}checked{/if} />显示
            </label>
            <label class="radio-inline">
                <input type="radio" name="show_share_people" value="2" {if $show_share_people['value'] == 2}checked{/if} /> 不显示
            </label>
        </div>
    </div>



<!--    <span id="exchange_note">
        {loop $exchange_note['value'] $key $item}
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-1 control-label">{if $key == 0}兑换说明:{/if}</label>
            <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
                <input class="form-control" style="width:80%;float:left" name="exchange_note[]" placeholder="兑换说明" value="{$item}" type="text">
                {if $key == 0}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" id="add_exchange_note">增加</button>
                {else}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_exchange_note(this)">删除</button>
                {/if}
            </div>
        </div>
        {/loop}
    </span>-->
<!--
    <span id="exchange_amount">
        {loop $exchange_amount['value'] $key $item}
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-1 control-label">{if $key == 0}兑换金额:{/if}</label>
            <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
                <input class="form-control" style="width:80%;float:left" name="exchange_amount[]" placeholder="兑换金额" value="{$item}" type="text">
                {if $key == 0}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" id="add_exchange_amount">增加</button>
                {else}
                <button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_exchange_amount(this)">删除</button>
                {/if}
            </div>
        </div>
        {/loop}
    </span>
-->

    {/if}
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="">
            <input type="hidden" name="op" value="{$op}">
            <input type="submit" name="submit" id="submit" value="保存" class="btn btn-primary">
        </div>
    </div>
</form>
<script type="application/javascript">
    $(function () {
        $('#add_exchange_note').click(function () {
            var html = '<div class="form-group">' +
                '<label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>' +
                '<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">' +
                '<input class="form-control" style="width:80%;float:left" name="exchange_note[]" placeholder="兑换说明" value="" type="text">' +
                '<button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_exchange_note(this)">删除</button>' +
                '</div>' +
                '</div>';
            $('#exchange_note').append(html);
        });

        $('#add_exchange_amount').click(function () {
            var html = '<div class="form-group">' +
                '<label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>' +
                '<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">' +
                '<input class="form-control" style="width:80%;float:left" name="exchange_amount[]" placeholder="兑换金额" value="" type="text">' +
                '<button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_exchange_amount(this)">删除</button>' +
                '</div>' +
                '</div>';
            $('#exchange_amount').append(html);
        });


        $('#add_popular_recommend').click(function () {
            var html = '<div class="form-group">' +
                '<label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>' +
                '<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">' +
                '<input class="form-control" style="width:80%;float:left" name="popular_recommend[]" placeholder="热门推荐" value="" type="text">' +
                '<button type="button" style="margin-left: 5px;" class="btn btn-primary" onclick="delete_popular_recommend(this)">删除</button>' +
                '</div>' +
                '</div>';
            $('#popular_recommend').append(html);
        });

    });
    function delete_exchange_note(t) {
        $(t).parent().parent().remove();
    }
    function delete_exchange_amount(t) {
        $(t).parent().parent().remove();
    }
    function delete_popular_recommend(t) {
        $(t).parent().parent().remove();
    }
</script>
{template 'footer'}

<script>
    $(function () {
        $("input[name='contact_type']").click(function () {
            if ($(this).val() ==1 ) {
                $('#customer_img').show();
                $('#qq_group_id').hide();
            }  else {
                $('#qq_group_id').show();
                $('#customer_img').hide();
            }
        });


        $("input[name='reward_type']").click(function () {
            if ($(this).val() ==1 ) {
                $('#currency_money').show();
                $('#pool').hide();
            }  else {
                $('#pool').show();
                $('#currency_money').hide();
            }
        });


    })


</script>